package com.guoxin.chapter2;

import java.util.ArrayList;
import java.util.List;
 
/**
 *
 * VM Args: -Xmx200M -XX:PermSize=10M -XX:MaxPermSize=10M
 * Created by tanlk on 2017/9/1 21:48.
 */
public class StringOomMock {
    static String  base = "string";
    public static void main(String[] args) {
        List<String> list = new ArrayList<>();
        for (int i=0;i< Integer.MAX_VALUE;i++){
            String str = base + base;
            base = str;
            list.add(str.intern());
        }
    }
}